function validateForm()
{                
    var email=document.forms["registration"]["email"].value;
    var vEmail=validateEmail(email);
    if(vEmail[0]==false)
        document.getElementById("emailError").innerHTML=vEmail[1]; 
    else
        document.getElementById("emailError").innerHTML=""; 
                    
    var password=document.forms["registration"]["password"].value;
    var vPassword=validatePassword(password);
    if(vPassword[0]==false)
        document.getElementById("passwordError").innerHTML=vPassword[1];
    else
        document.getElementById("passwordError").innerHTML="";
                
    var rePassword=document.forms["registration"]["rePassword"].value;
    var vRePassword=validateRePassword(password,rePassword);
    if(vRePassword[0]==false)
        document.getElementById("rePasswordError").innerHTML=vRePassword[1];
    else
        document.getElementById("rePasswordError").innerHTML="";
                
    var nickname=document.forms["registration"]["nickname"].value;
    var vNickname=validateNickname(nickname);
    if(vNickname[0]==false)
        document.getElementById("nicknameError").innerHTML=vNickname[1];
    else
        document.getElementById("nicknameError").innerHTML="";
                
    var answer=document.forms["registration"]["answer"].value;
    var vAnswer=validateAnswer(answer);
    if(vAnswer[0]==false)
        document.getElementById("answerError").innerHTML=vAnswer[1];
    else
        document.getElementById("answerError").innerHTML="";
                
    if(vEmail[0]==false || vPassword[0]==false || vRePassword[0]==false || vNickname[0]==false || vAnswer[0]==false)
        return false;
    return true; 
}